package com.example.chatroom.service;

import com.example.chatroom.entity.UserEntity;
import com.example.chatroom.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public int reg(UserEntity userEntity){
        return userMapper.reg(userEntity);
    }

    public UserEntity selectUserByName(String username){
        return userMapper.selectUserByName(username);
    }
}
